package com.liuyjy.es.enums;

/**
 * @Author liuyjy
 * @Date 2025/2/24 17:37
 * @Description: TODO
 **/
// ESErrorCode.java
public enum ESErrorCode {
    INDEX_NOT_FOUND(1001, "索引不存在"),
    INDEX_CREATE_FAILED(1002, "索引创建失败"),
    DOCUMENT_SAVE_FAILED(1003, "文档保存失败"),
    QUERY_EXECUTE_FAILED(1004, "查询执行失败"),
    BULK_OPERATION_FAILED(1005, "批量操作失败");

    private final int code;
    private final String message;

    ESErrorCode(int code, String message) {
        this.code = code;
        this.message = message;
    }

    public int getCode() {
        return code;
    }

    public String getMessage() {
        return message;
    }
}
